package com.appstore.service.impl;

import com.appstore.mapper.AppImageMapper;
import com.appstore.service.AppImageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AppImageServiceImpl implements AppImageService {
    @Resource
    private AppImageMapper appImageMapper;

    @Override
    public void addImage(Long appId, String originalFilename) {
        //String imageUrl = "http://192.168.0.131:8889/images/" + originalFilename;
        appImageMapper.addImage(appId,originalFilename);
    }

    @Override
    public  int deleteByAppId(Long appId) {
        return appImageMapper.deleteByAppId(appId);
    }
}
